using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing.Design;
using System.Collections;

using System.Windows.Forms;
using System.Drawing;
using Camalon.Drawing;
using Camalon.Drawing.Shapes;


namespace Camalon.Drawing.Design
{
	/// <summary>
	/// Summary description for StarDesigner.
	/// </summary>
	public class MagicShapeDesigner:ShapeDesigner
	{
		public MagicShapeDesigner()
		{
			//
			// TODO: Add constructor logic here
			//
		}


		public MagicShape MagicShape
		{
			get{ return (MagicShape)this.Component;}
		}

		PropertyDescriptor	_propValue		= TypeDescriptor.GetProperties(typeof( MagicShape ))["InSize"];
		SizeScale _oldValue;

		public override void BeginEditControlPoints()
		{
			_oldValue = this.MagicShape.InSize;
			base.BeginEditControlPoints ();
		}

		public override void EndEditControlPoints()
		{
			SizeScale newValue = this.MagicShape.InSize;
			this.MagicShape.InSize = _oldValue;
			_propValue.SetValue(this.MagicShape, newValue);
			base.EndEditControlPoints ();
		}


		

	}
}
